package com.mgvlife.ddlw.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "tb_student")
public class Student {
	@Id
	@Column(length = 36, name = "id", unique = true)
	private String id;
	@Column(length = 36)
	private String openId;
	@Column(length = 200)
	private String name;
	@Column(length = 50)
	private String stuId;
	@OneToOne(targetEntity = Clazz.class)
	private Clazz clazz;
	@OneToMany(targetEntity = SignInInfo.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<SignInInfo> signInInfos;
	@Column(length = 500)
	private String imgUrl;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStuId() {
		return stuId;
	}

	public void setStuId(String stuId) {
		this.stuId = stuId;
	}

	public Clazz getClazz() {
		return clazz;
	}

	public void setClazz(Clazz clazz) {
		this.clazz = clazz;
	}

	public List<SignInInfo> getSignInInfos() {
		return signInInfos;
	}

	public void setSignInInfos(List<SignInInfo> signInInfos) {
		this.signInInfos = signInInfos;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
}
